home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
TCL1
/
CDICTION
/
CSMARTDO.H
< prev
next >
Wrap
Text File
|
1989-09-15
|
2KB
|
51 lines
/*****************************************************************************
CSmartDocument - subclass of CDocument that provides some additional services.
These are:
Ñ Maintains a list of editable text items and supports tabbing
between items as in dialogs. CSmartEditText is also required
for this feature.
Ñ Has an instance variable itsReturnGopher. A returnGopher is
a Bureaucrat that handles only CR and Enter keydowns. If
a CR or Enter keydown reaches the document level it is dispatched
to the returnGopher if one exists. Useful for items like default
buttons.
Ñ Windows that are not disposed when closed. If ISmartDocument is
called with closeDisposes = FALSE, then the window will only
be hidden when closed. The application must then support some
way of showing the window again, as in a window menu.
by Dan Podwall - you may do anything you please with this code except
charge for it, with the exception of normal network download charges.
*****************************************************************************/
#define _H_CSmartDocument
#include "CDocument.h"
#include "CSmartEditText.h"
struct CSmartDocument : CDocument
{
struct CList *itsEditItems;
struct CSmartEditText *itsActiveText;
CBureaucrat *itsReturnGopher; /* gets CR and enter, e.g. default btn */
Boolean closeDisposes;
/* public methods */
virtual void ISmartDocument(CBureaucrat *aSupervisor, Boolean printable,
Boolean closeDisposes);
virtual void AddEditItem( CSmartEditText *anEditItem);
virtual void ActivateEditItem( CSmartEditText *anEditItem);
virtual void ActivateNextEditItem( CSmartEditText *currItem);
virtual void SelectWindow( void);
virtual void HideWindow( void);
virtual Boolean Close( Boolean Quitting);
virtual void SetReturnGopher( CBureaucrat *aReturnGopher);
virtual void DoKeyDown(char theChar, Byte keyCode, EventRecord *macEvent);
virtual void Dispose( void);
};